package Month07.day24;

import java.util.ArrayList;
import java.util.Collection;
import java.util.function.Predicate;

public class DemoCollection {
    public static void main(String[] args) {
        Collection<String> collection = new ArrayList<>();
        collection.add("dijia");
        collection.add("daina");
        collection.add("gaiya");
        collection.add("aguru");
        collection.removeIf(new Predicate<String>() {
            @Override
            public boolean test(String s) {
                if (s.charAt(0)=='d'){
                    return true;
                }
                return false;
            }
        });
        System.out.println(collection);
    }
}
